]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
js: Fix alignment
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 6 Nov 2019 11:05:56 +0000 (12:05 +0100)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 11 Nov 2019 16:52:10 +0000 (16:52 +0000)
The old StBin alignment properties defaulted to MIDDLE, while the
ClutterActor properties use FILL. Fix the resulting fallout by
setting the alignment explicitly where necessary.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/809

js/ui/animation.js
js/ui/search.js

index b8d5ad5c32e1838aeb1d1bdcf5578ca1193a51ab..d047b75ed021ed1dec4129ef8224253fe2722166 100644 (file)
@@ -71,6 +71,10 @@ class Animation extends St.Bin {
         this._animations = textureCache.load_sliced_image(file, width, height,
                                                           scaleFactor, resourceScale,
                                                           this._animationsLoaded.bind(this));
+        this._animations.set({
+            x_align: Clutter.ActorAlign.CENTER,
+            y_align: Clutter.ActorAlign.CENTER,
+        });
         this.set_child(this._animations);
 
         if (wasPlaying)
index 2f3f47d93d5e2c7fb8ada91e4167847ceb5c96b9..6c0d05a79edf0ba85c8b5d9eebc27fff7d45060d 100644 (file)
@@ -452,7 +452,11 @@ var SearchResultsView = GObject.registerClass({
 
         this.add_child(this._scrollView);
 
-        this._statusText = new St.Label({ style_class: 'search-statustext' });
+        this._statusText = new St.Label({
+            style_class: 'search-statustext',
+            x_align: Clutter.ActorAlign.CENTER,
+            y_align: Clutter.ActorAlign.CENTER,
+        });
         this._statusBin = new St.Bin({ y_expand: true });
         this.add_child(this._statusBin);
         this._statusBin.add_actor(this._statusText);